/*

<svg width="230" height="250" version="1.1" xmlns="http://www.w3.org/2000/svg">

  <rect x="10" y="10" width="30" height="30" stroke="black" fill="transparent" stroke-width="5"/>
  <rect x="60" y="10" rx="10" ry="10" width="30" height="30" stroke="black" fill="transparent" stroke-width="5"/>

  <circle cx="25" cy="75" r="20" stroke="red" fill="transparent" stroke-width="5"/>
  <ellipse cx="75" cy="75" rx="20" ry="5" stroke="red" fill="transparent" stroke-width="5"/>

  <line x1="10" x2="50" y1="110" y2="150" stroke="orange" stroke-width="5"/>
  <polyline points="60 110 65 120 70 115 75 130 80 125 85 140 90 135 95 150 100 145"
      stroke="orange" fill="transparent" stroke-width="5"/>

  <polygon points="50 160 55 180 70 180 60 190 65 205 50 195 35 205 40 190 30 180 45 180"
      stroke="#336600" fill="#99FF99" stroke-width="3"/>

  <text x="10" y="225" stroke="#336600" fill="#99FF99>Hello SVG</text>
</svg>

*/

#include "lib/svg.cpp"

int main() {
	// <rect x="10" y="10" width="30" height="30" stroke="black" fill="transparent" stroke-width="5"/>
	rect r1;
	r1.x = "10";
	r1.y = "10";
	r1.rx = "0";
	r1.ry = "0";
	r1.width = "30";
	r1.height = "30";
	r1.stroke = "black";
	r1.fill = "transparent";
	r1.stroke_width = "5";

	// <rect x="60" y="10" rx="10" ry="10" width="30" height="30" stroke="black" fill="transparent" stroke-width="5"/>
	rect r2;
	r2.x = "60";
	r2.y = "10";
	r2.rx = "10";
	r2.ry = "10";
	r2.width = "30";
	r2.height = "30";
	r2.stroke = "black";
	r2.fill = "transparent";
	r2.stroke_width = "5";
	r2.transform_origin = "75 25";
	r2.transform = "rotate(15)";

	// <circle cx="25" cy="75" r="20" stroke="red" fill="transparent" stroke-width="5"/>
	circle c;
	c.cx = "25";
	c.cy = "75";
	c.r = "20";
	c.stroke = "red";
	c.fill = "transparent";
	c.stroke_width = "5";

	// <ellipse cx="75" cy="75" rx="20" ry="5" stroke="red" fill="transparent" stroke-width="5"/>
	ellipse e;
	e.cx = "75";
	e.cy = "75";
	e.rx = "20";
	e.ry = "5";
	e.stroke = "red";
	e.fill = "transparent";
	e.stroke_width = "5";

	// <line x1="10" x2="50" y1="110" y2="150" stroke="orange" stroke-width="5"/>
	line l;
	l.x1 = "10";
	l.x2 = "50";
	l.y1 = "110";
	l.y2 = "150";
	l.stroke = "orange";
	l.stroke_width = "5";

	// <polyline points="60 110 65 120 70 115 75 130 80 125 85 140 90 135 95 150 100 145"
	// stroke="orange" fill="transparent" stroke-width="5"/>
	polyline pl;
	pl.points = "60 110 65 120 70 115 75 130 80 125 85 140 90 135 95 150 100 145";
	pl.stroke = "orange";
	pl.fill = "transparent";
	pl.stroke_width = "5";

	// <polygon points="50 160 55 180 70 180 60 190 65 205 50 195 35 205 40 190 30 180 45 180"
	// stroke="#336600" fill="#99FF99" stroke-width="3"/>
	polygon pg;
	pg.points = "50 160 55 180 70 180 60 190 65 205 50 195 35 205 40 190 30 180 45 180";
	pg.stroke = "#336600";
	pg.fill = "#99FF99";
	pg.stroke_width = "3";

	// <text x="10" y="225" stroke="blue">Hello SVG</text>
	text t;
	t.x = "10";
	t.y = "225";
	t.font_size = "15pt";
	t.font_family = "Times New Roman";
	t.font_style = "italic";
	t.stroke = "#336600";
	t.fill = "#99FF99";
	t.stroke_width = "1";
	t.content = "Hello SVG";

	SVG svg;
	svg.height = "230";
	svg.width = "300";
	svg += r1;
	svg += r2;
	svg += c;
	svg += e;
	svg += l;
	svg += pl;
	svg += pg;
	svg += t;
	cout << svg;
}